<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <title>接口测试</title>
    <link href="http://cdn.bootcss.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
    <link href="http://cdn.bootcss.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
    <link href="http://static.bootcss.com/www/assets/css/site.min.css?v3" rel="stylesheet">
    <link href="http://static.bootcss.com/www/assets/ico/favicon.png" rel="shortcut icon">
    <script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
</head>
<body>
    <div class="container">
        <div class="row row-offcanvas row-offcanvas-right">
            <div class="col-xs-12 col-sm-12">
                <div class="row" >
                    <div class="col-xs-1 col-lg-4">
                        <h1>接口测试</h1>
                        <div class="thumbnail">
                        <form class="form-signin" action="/Runapi/save/" method="post">
                            <b>接口名称</b>:
                            <input class="form-control" placeholder="填写接口名称" type="text" name="remark" required><br>
                            <b>接口文档地址</b>:
                            <input class="form-control" placeholder="填写文档地址" type="text" name="doc" required><br>
                            <b>请填URL</b>:
                            <input class="form-control" placeholder="填写项目路径" type="text" name="url" required><br>
                            <b>请求方式</b>:
                                <label><input value="get" type="radio" name="method" checked>GET</label>
                                <label><input value="post" type="radio" name="method">POST</label><br />
                            <div class="thumbnail">
                                <b>参数名称</b>:
                                <input placeholder="请填写" type="text" name="params[]"><br>
                               <!--  <b>参数value</b>:
                                <input value="<?php echo $item['value'];?>" placeholder="请填写" type="text" name="param[<?php echo $k;?>][value]"><br> -->
                                
                                <a href="#" onclick="del_param(this)">删除</a>
                            </div>

                             
                            <input type="button" name="add_param" id="add_param" value="添加参数" class="btn btn-lg btn-primary btn-block"><br />
                            <input type="submit" name="submit" value="保存资源" class="btn btn-lg btn-primary btn-block"><br />
                        </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <hr />
    </div>
    <div class="blog-masthead">
        <div class="container">
            <nav class="blog-nav">
                <p class="blog-nav-item">&copy; Company 2014</p>
            </nav>
        </div>
    </div>
</body>
</html>
 
<script>
    $("#add_param").click(function(){
        var input_len = $("form input").size();
        input_len++;
        $(this).before('\
            <div class="thumbnail">\
                <b>参数名称</b>:\
                <input value="" placeholder="请填写" type="text" name="params[]"><br>\
                <a href="#" onclick="del_param(this)">删除</a>\
            </div>\
        '); 
    });
    function del_param(obj) {
        $(obj).parent().remove();
    }

  
</script>